package com.hltx.controller.index;


import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.http.client.methods.HttpGet;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hltx.util.HttpClientManagerT;






/**
 * 首页controller
 * 
 * @author shibeilei
 *
 */
@Controller
public class IndexController{

	
	
	/**
	 * 打开首页
	 */
	@RequestMapping("/index")
	public String index(HttpServletRequest request, HttpServletResponse response) {
		Cookie cookie = new Cookie("aaaaa", "f76de5163361e");
		cookie.setMaxAge(10 * 60 * 60 * 1000);// 设置为2个钟
		cookie.setDomain(".tmall.com");
		cookie.setPath("/");
		response.addCookie(cookie);
		
		//HttpGet get = new HttpGet("http://www.taobao.com/go/app/tmall/login-api.php?0.678345007771015");
		//get.addHeader("referer", "https://www.tmall.com");
		
		//String res = HttpClientManagerT.getData(get);
		//System.out.println(res);
		
		return "index";
	}
	

}
